<template>
  <el-form :inline="true" :model="userInform">
    <el-row :gutter="20" >
      <el-col :span="9">
        <el-form-item label="客户名称">
          <el-input v-model="userInform.username" placeholder="请输入" clearable />
        </el-form-item>
      </el-col>
      <el-col :span="9">
        <el-form-item label="客户标签">
          <el-select v-model="userInform.userLabel" placeholder="请选择" clearable>
            <el-option label="Zone one" value="shanghai" />
            <el-option label="Zone two" value="beijing" />
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6" :align="'right'">
        <el-form-item>
          <el-button type="primary">搜索</el-button>
          <el-button>重置</el-button>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24" >
       <el-form-item label="客户编号">
        <el-row>
        <el-col :span="11" >
          <el-input v-model="userInform.userNum[0]" placeholder="请输入" clearable />
        </el-col>
        <el-col :span="2"  style="text-align: center;">
          <span>~</span>
        </el-col>
        <el-col :span="11" >
         <el-input v-model="userInform.userNum[1]" placeholder="请输入" clearable />
        </el-col>
        </el-row>
      </el-form-item>
      </el-col>
  </el-row>
  <el-table :data="addChick" style="width: 100%" :cell-style="{textAlign:'center'}" :header-cell-style="{'text-align': 'center',background:'#fafafa',color:'#606266' }" @select="selectHandel" @select-all="selectHandel">
    <el-table-column type="selection" width="55"/>
    <el-table-column prop="no" label="客户编号" />
    <el-table-column prop="labelText" label="客户标签" />
    <el-table-column prop="name" label="客户名称" />
    <el-table-column prop="updTime" label="更新时间" />
  </el-table>
  </el-form>
</template>
<script setup lang="ts">
import {ref, onMounted} from "vue"
import { getCompanyList } from "@a/userInfo"
const userInform = ref({
  username: "",
  userLabel: "",
  userNum: []
})
const addChick=ref([])
const getSearchClient = ()=>{
  getCompanyList().then((res:any)=>{
    if(res.code === 10000){
      addChick.value = res.result.records 
    }
  })
}
const userInfo:any = ref([])
const selectHandel = (selection:any)=>{
  userInfo.value = selection
}
defineExpose({
  userInfo
})
onMounted(()=>{
  getSearchClient()
})
</script>

<style scoped></style>